package com.zengge.zbc.utils.http;


import com.fasterxml.jackson.core.type.TypeReference;
import okhttp3.FormBody;
import okhttp3.Response;

import java.io.IOException;
import java.util.Map;

public interface HttpClient {

    void postJson(final String url, final Map<String, String> headers, final Object object, final Callback callback);

    void postFormBody(final String url, final Map<String, String> headers, final FormBody formBody, final Callback callback);

    Response postFormBody(final String url, final Map<String, String> headers, final FormBody formBody) throws IOException;

    void get(final String url, final Map<String, String> headers, Callback callback);

    <T>T get(final String url, final Map<String, String> headers, TypeReference<T> type);
}
